package com.ruoyi.business.service.impl;

import com.ruoyi.business.service.IJtAppUserService;
import com.ruoyi.business.service.IJtOrderService;
import com.ruoyi.business.service.IJtPaymentOrderService;
import com.ruoyi.business.service.IMainPageService;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.HashMap;
import java.util.Map;

/**
 * @Author Alan Zhang
 * @Date 2025/7/18 11:08
 */
@Service
public class MainPageServiceImpl implements IMainPageService {
    @Autowired
    private IJtAppUserService jtAppUserService;
    @Autowired
    private IJtOrderService jtOrderService;
    @Autowired
    private IJtPaymentOrderService jtPaymentOrderService;

    public Map mainPageData(){
        HashMap<String, Object> map = new HashMap<>();
        String startDate = DateUtils.getDate();
        String endDate = DateUtils.getDate();
        //天
        jtAppUserService.selectAppUserCount(startDate, endDate);
        //月
        jtOrderService.selectOrderCount(startDate, endDate);
        //月
        jtPaymentOrderService.selectJtPaymentOrderAmount(startDate, endDate);

        return new HashMap();
    }
}
